home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
windows
/
astrot12.zip
/
ASTROTIM.XWS
< prev
next >
Wrap
Text File
|
1992-03-13
|
2KB
|
60 lines
/*
AstroTime - CrossTalk for Windows Clock Setter
⌐ CompuTalking - RB March 1992
All Rights Reserved.
Version 1.2 13 March 1992
*/
cls
string TRUETIME, TRUETEST, SHORTTIME, MINSEC, UNHOUR, NEWHOUR, ASTROTIME, DOSMIN, DOSSEC, BATTEXT, STRUNHOUR, GREENTIME, LOCATEU, MIDPOSITION, NOWTIME
if exists("c:\newtime.bat") then delete "c:\newtime.bat"
LABEL TEST
wait for "*|"
nextline TRUETIME
wait for "*|"
nextline TRUETEST
if length(TRUETIME)=length(TRUETEST) THEN GOTO GOODTEST ELSE GOTO TEST
LABEL GOODTEST
BYE
cls
NOWTIME=time
LOCATEU=instr(TRUETIME, "UT")
MIDPOSITION= LOCATEU - 7
SHORTTIME=MID(TRUETIME,MIDPOSITION,6)
MINSEC=right(SHORTTIME,4)
UNHOUR=intval(left(SHORTTIME,2))
NEWHOUR = UNHOUR + intval(PASSWORD)
if NEWHOUR < 0 THEN NEWHOUR = NEWHOUR + 24
DOSMIN=left(MINSEC,2)
DOSSEC=right(MINSEC,2)
STRUNHOUR=str(UNHOUR)
GREENTIME= STRUNHOUR + ":" + DOSMIN + ":" + DOSSEC
if NEWHOUR=0 then NEWHOUR="00" else NEWHOUR=str(NEWHOUR)
ASTROTIME= NEWHOUR + ":" + DOSMIN + ":" + DOSSEC
open random "c:\newtime.bat" as 1
BATTEXT= "time " + ASTROTIME
put 1, BATTEXT
close 1
run "C:\NEWTIME.BAT"
dialogbox 100, 25, 130, 120
groupbox 5, 0, 120, 82, ""
ctext 8, 8, 110, 10, 'AstroTime'
ctext 8, 22, 110, 10, 'According to the'
ctext 8, 32, 110, 20, 'United States Naval Observatory'
rtext 8, 48, 110, 10, 'GMT = ' + GREENTIME
rtext 8, 58, 110, 10, 'Local Time = ' + NOWTIME
rtext 8, 68, 110, 10, 'Corrected Local Time = ' + ASTROTIME
ctext 8,110,115,10, '⌐ CompuTalking - RB March 1992'
pushbutton 5, 90, 120, 14, 'Cancel', tabstop, cancel
enddialog
if exists("c:\newtime.bat") then delete "c:\newtime.bat"
quit